home *** CD-ROM | disk | FTP | other *** search
- /**
- * $Id: NewMsg.rexx,v 1.1 1994/05/10 12:43:41 alex Rel $
- *
- * REXX script to connect HBMsg to TurboText
- *
- * (c) Copyright 1994 HiSoft
- **/
-
- options RESULTS
-
- parse arg '"' UNIT '"' '"' FILE '"' LINE POSITION NULL ZERO CLASS ERRNUM MESSAGE
-
- fn = ParseFileName(FILE, 'FILE')
-
- Address 'TURBOTEXT' 'GetPort' fn
- port = RESULT
- Address VALUE port
- 'Window2Front'
- 'ActivateWindow'
- 'Move' LINE
- 'SetStatusBar' MESSAGE
-
- exit 0
-
- /* Split filename from path */
- ParseFileName: procedure
- parse arg FilePath, Part
-
- DivPos = max(lastpos(':', FilePath),lastpos('/', FilePath)) +1
- if abbrev('FILE', upper(Part)) then
- return substr(FilePath, DivPos)
- else
- return strip(left(FilePath, DivPos-1),'T', '/')
-